﻿using UnityEngine;
using System.Collections;

public class Character{

	private Object oCharacter { get; set; }
	private int iMoney { get; set; }
	private Inventory _inInventory { get; set;}
	private EnumTypes.CharactherAction _caAction;
	
	public Character()
	{
		inInventory = new Inventory();
	}
	public int Money
	{
		get{ return iMoney;}
		set { iMoney = value; }
	}
	
	public Inventory inInventory
	{
		get { return _inInventory; }
		set { _inInventory = value; }
	}
	
	public EnumTypes.CharactherAction Action
	{
		get { return _caAction;}
		set { _caAction = value;}
	}
	
	public void Talk()
	{
		
	}
	
	public void Use(Element item)
	{
		inInventory.UseElement(item);
	}
	
	public void Grab(Element item)
	{
		inInventory.AddElement(item);	
	}
	
	public void GetMoney(int iAmount)
	{
		Money = Money + iAmount;
	}
	
	public bool Buy(int iAmount)
	{
		if(iAmount <= Money){
			Money= Money - iAmount;
			return true;
		}else
			return false;
	}
}
